home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / utils / spred40 / spred4.doc < prev    next >
Text File  |  1995-03-08  |  9KB  |  193 lines

  1. SPRED v4.0 DOCUMENTATION
  2. ---------------------
  3.  
  4. SPRED v4.0 Sprite Editor by Ben Chadwick
  5. Copyright (C),  1995 All rights reserved.
  6. This program is unregistered shareware.
  7. Please spread it to friends and enemies alike!
  8. However, this may NOT be distributed registered or
  9. with any of the files modified in any way!
  10. To register, send $20 to
  11.  
  12.     Ben Chadwick
  13.     678 Old Hunt Way
  14.     Herndon, Va. 22070,
  15.     USA
  16.  
  17. questions, comments, bugs, etc. should be e-mailed to
  18. bchadwic@boom.tjhsst.edu or to the above address by normal mail.
  19.  
  20. Intro
  21. -----
  22.     SPRED started as SPRITED a few years ago before I discovered that someone
  23. else had used that same name for his sprite editor (it's a fairly obvious name
  24. for a sprite editor.)  So I cut out the "IT" and turned it into SPRED.  I did
  25. not plan to spread SPRED (ha-ha), but then I realized that I had put quite a
  26. lot of work into this and other people might find it useful, and I might need
  27. some money sometime soon.  SPRED is about as user-friendly as your average
  28. suicide pill, but hard core programmers (those who have memorized all the
  29. Turbo C editor commands, or "vi" commands) shouldn't object.
  30.  
  31.     SPRED operates in Mode X 320x240x256 colors.  The sprite sizes range up
  32. to 180x180.  It automatically uses the most zoom available on the screen to
  33. allow easy use.  It uses BIOS palette commands, mainly because direct writes
  34. didn't work on my brother's laptop.
  35.     SPRED uses a raw picture image format- no headers or trailers (although
  36. it will load files with trailers without error.)  The raw format is used for
  37. all sorts of things, not just sprites, but SPRED is written mainly for
  38. programmers of games and applications.
  39.  
  40. Running it
  41. ----------
  42.     To run SPRED, type SPRED4 followed by the X size, then the Y size.  The
  43. defaults (in case you leave them blank) are 16 and 16.  Anything you type
  44. after that will set the preserve-aspect-ratio flag, which means that your
  45. sprite will be made of square grids instead of rectangular ones.  (Not setting
  46. this means you might be able to zoom further, but you might have very long
  47. zoomed pixels.) For any square sprite it is unnecessary to bother with the
  48. flag.  The zoom box is on the right side of the screen; this is where drawing
  49. is done.
  50.     For any sprite size 50 or under, there will be two special areas on the
  51. left side of the screen.  The upper of these two areas will be a single
  52. version of the sprite, while the lower will be a 2x2 box of the sprite laid
  53. out 4 times so that the user can see it as it would appear if placed next to
  54. itself.  If the sprite is between 90 and 51, there will be no 2x2 box, but the
  55. single sprite area will still appear.  Any sizes above these will not be
  56. zoomed, so the sprite can be seen in it's normal size in the main editor box.
  57. (You will not be able to see anything in these areas until you have started
  58. drawing or loaded a sprite.)
  59.  
  60. Important basics
  61. ----------------
  62.     The most important things to know in SPRED are that your left button will
  63. draw pixels (when placed inside the large box in the right side of the screen)
  64. and the right button selects colors from anywhere on the screen.  The mouse
  65. really doesn't do anything else- most options are controlled from the keyboard.
  66. The color selected by the right button is the color that will be drawn.  The
  67. color is displayed in the lower left corner, followed by the palette register
  68. number, and then the red, green, and blue values.
  69.     Another important thing to know is that at any prompt, Q will cancel the
  70. action.  So if you accidentally tell it to load a sprite after 15 minutes of
  71. work, don't worry.
  72.  
  73. Palette options
  74. ---------------
  75.     Palette files are assumed to be 768 byte files consisting of 256 three
  76. byte chains of red, green, and then blue.  I think most programs use this
  77. format for palettes.
  78.  
  79. key      action
  80.  
  81. P        load a palette
  82. O        save a palette
  83.  
  84. Z        raises the RED value of current color
  85. X        lowers the RED value
  86. C        raises the GREEN value
  87. V        lowers the GREEN value
  88. B        raises the BLUE value
  89. N        lowers the BLUE value
  90.  
  91. (The way, simplest way to remember those last 6 is that they are the lower
  92. left alphabet keys on the keyboard.  The position on the keyboard is about
  93. the same as the readout on the screen.)
  94.  
  95. E       changes background color for visibility.
  96. You'll want to use 'E' if you load a palette file and the first color is
  97. about the same as the second.  Since SPRED uses the second color as the
  98. text color and box color, if the two colors are similar it is very hard to
  99. see what you're doing.  E will flip the background color to white or black.
  100.  
  101. Sprite Manipulation
  102. -------------------
  103. R  rotate sprite 90 degrees right (only on square sprites)
  104. K  rotate sprite 90 degrees left  (only on square sprites)
  105.  
  106. The arrow keys slide the sprite around.  The walls wrap around, so no data is
  107. lost.   The `End' key flips the sprite over the y axis, and `Pgdn' flips the
  108. sprite over the x axis.  `Home' inverts the sprite (exchanges x with y)
  109.  
  110. Lines, Circles, Ellipses, Boxes, Fills, and the Clipboard
  111. ---------------------------------------------------------
  112.   Normally, in graphic editing programs, it is very painful to make lines that
  113. radiate from a point, because you constantly have to re-select the initial
  114. point.  Fortunately, SPRED does not make you do that.  Since actions are done
  115. on the keyboard, you can move the mouse while holding down a key and get
  116. radial lines, circles, and boxes.
  117.  
  118. G  starts a line at the current mouse position.
  119. H  When you hit this key, a line is drawn from G to the current position.
  120.  
  121. I  starts a rectangle at X1,Y1.
  122. J  Finishes the rectangle.
  123. W  copies a section into a temporary clipboard.  This also uses the starting
  124.    coordinate selected with the I key.
  125. A  Stamps the clipboard on current location.
  126.  
  127. D  Flood-fills in the current color.
  128.  
  129. T  Picks the origin for circles.
  130. Y  Defines the radius of a circle and draws from the point selected by T.
  131.  
  132. M  defines the center of an ellipse.
  133. [  defines the X axis of an ellipse ('M' must be defined first).
  134. ]  defines the Y axis of an ellipse and draws it after you pick 'M' and '['.
  135.  
  136. Settings and Files and Exitting
  137. -------------------------------
  138. U  Toggles filling.
  139.    If filling is on (indicated on-screen) the program will fill circles,
  140.    ellipses and rectangles.
  141. /  tells the program to use the Fancieaux-Shmancy shading algorithm on fills.
  142.    This algorithm uses the distance from the center of a circle or ellipse to
  143.    choose a color.  For rectangles, it will scan vertically or horizontally
  144.    along the palette.  (The orientation is chosen by the \ key- see below.)
  145.    If you want to orient the colors to shade in the opposite direction, switch
  146.    the rectangle vertices.
  147. \  Tells the program to use the opposite axis (vert or horiz) in bar shades.
  148. .  Tells the system to invert- that is, save and load using columns before rows.
  149.    Sometimes we want to load our sprites inverted.
  150. L  Loads a sprite.  Since SPRED doesn't read or save headers, you must
  151.    remember the sprite dimensions yourself!
  152. S  Saves a sprite.
  153. Q  Prompts to see if you want to quit SPRED.
  154.  
  155. Tips & Things to try
  156. --------------------
  157.   Among other things... The pointer for SPRED4 was created in the last
  158. incarnation of SPRED, and can be customized.  Simply run SPRED4 16 16,
  159. and load "POINTER.PTR" and then edit the pointer to your heart's content.
  160. Please do not distribute modified files, however.
  161.  
  162.   Here is C code that will load one of SPRED's raw linear bitmaps and convert
  163. it to a planar bitmap (stored broken into parts as first plane data, second
  164. plane data, third plane data, fourth plane data.)
  165.  
  166. #define MAXSPRITEX (insert X size here)
  167. #define MAXSPRITEY (insert Y size here)
  168. #define MULT       (insert X*Y divided by 4 (or shifted right twice) here)
  169. void loadsprite(char *ch)
  170. {
  171.    FILE *stream;
  172.    int a;
  173.  
  174.    if ((stream = fopen(ch,"rb")) == NULL) printf("Error.\n");
  175.    else
  176.    for (a=0;a<MAXSPRITEX*MAXSPRITEY;a++)
  177.       fread(&spritedata[(a&3)*MULT + (a>>2)],sizeof(char),1,stream);
  178.    fclose(stream);
  179. }
  180.  
  181. What to expect in future versions (but only if people respond to this one!)
  182. ---------------------------------------------------------------------------
  183. I plan to add in...
  184.   - Multiple picture formats, including support for the files used in the
  185.     popular library XLIB and other mainstream formats.
  186.   - Multiple pages of sprites
  187.   - Better palette control
  188.   - More user-friendliness (heh heh) (Just don't expect Windows anytime soon)
  189.   - Better shading, more types of fills (including tiled-from-clipboard) etc.
  190.   - Miscellaneous improvements.
  191. ...Plus fix any bugs that are reported.
  192.  
  193.